package com.mvc4g.example.client.company.actions;

import com.mvc4g.client.ActionInterface;
import com.mvc4g.client.Controller;
import com.mvc4g.client.Event;
import com.mvc4g.example.client.Constants;
import com.mvc4g.example.client.company.CompanyBean;
import com.mvc4g.example.client.company.views.CreateCompanyView;

public class CopyCompanyAction implements ActionInterface, Constants {

	@Override
	public void execute(Controller controller, Object form) {
		CompanyBean company = (CompanyBean) form;
		CreateCompanyView createView = (CreateCompanyView) controller
				.getView(CREATE_VIEW);
		createView.init(company);
		controller.handleEvent(new Event(CHANGE_PAGE, createView));		
	}

}
